﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ryan.MongoRepository.Domain;
using Ryan.MongoRepository;

namespace Ryan.MongoFileHelper.Domain
{
    public abstract class FileObj : Entity
    {
        public FileObj()
        {
            //this.Id = Guid.NewGuid().ToString("N");
            this.CreateDate = DateTime.Now;
        }

        /// <summary>
        /// 图片所有者
        /// </summary>
        public string Owner { get; set; }
        /// <summary>
        /// 图片类型
        /// </summary>
        public int Type { get; set; }
        /// <summary>
        /// 图片文件流
        /// </summary>
        public byte[] Content { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateDate { get; set; }
    }

    [CollectionName("ProductImage")]
    public class ProductImage : FileObj { 
    
    }

    [CollectionName("DownFiles")]
    public class DownFile : FileObj
    {

    }
}
